package o;

import java.io.IOException;
import java.util.List;
import o.fuo.d;
import okhttp3.internal.connection.RealConnection;
import okhttp3.internal.connection.StreamAllocation;

public final class fvz implements d {
    private final fus ʻ;
    private final ftz ʼ;
    private final int ʽ;
    private final StreamAllocation ˊ;
    private final RealConnection ˋ;
    private final int ˋॱ;
    private final int ˎ;
    private final List<fuo> ˏ;
    private int ͺ;
    private final fvv ॱ;
    private final fum ॱॱ;
    private final int ᐝ;

    public fvz(List<fuo> list, StreamAllocation streamAllocation, fvv o_fvv, RealConnection realConnection, int i, fus o_fus, ftz o_ftz, fum o_fum, int i2, int i3, int i4) {
        this.ˏ = list;
        this.ˋ = realConnection;
        this.ˊ = streamAllocation;
        this.ॱ = o_fvv;
        this.ˎ = i;
        this.ʻ = o_fus;
        this.ʼ = o_ftz;
        this.ॱॱ = o_fum;
        this.ʽ = i2;
        this.ᐝ = i3;
        this.ˋॱ = i4;
    }

    public fuh ॱ() {
        return this.ˋ;
    }

    public int ˏ() {
        return this.ʽ;
    }

    public int ˋ() {
        return this.ᐝ;
    }

    public int ˎ() {
        return this.ˋॱ;
    }

    public StreamAllocation ʻ() {
        return this.ˊ;
    }

    public fvv ʼ() {
        return this.ॱ;
    }

    public ftz ॱॱ() {
        return this.ʼ;
    }

    public fum ʽ() {
        return this.ॱॱ;
    }

    public fus ˊ() {
        return this.ʻ;
    }

    public fvb ॱ(fus o_fus) throws IOException {
        return ˊ(o_fus, this.ˊ, this.ॱ, this.ˋ);
    }

    public fvb ˊ(fus o_fus, StreamAllocation streamAllocation, fvv o_fvv, RealConnection realConnection) throws IOException {
        if (this.ˎ >= this.ˏ.size()) {
            throw new AssertionError();
        }
        this.ͺ++;
        if (this.ॱ != null && !this.ˋ.supportsUrl(o_fus.ˏ())) {
            throw new IllegalStateException("network interceptor " + this.ˏ.get(this.ˎ - 1) + " must retain the same host and port");
        } else if (this.ॱ == null || this.ͺ <= 1) {
            Object o_fvz = new fvz(this.ˏ, streamAllocation, o_fvv, realConnection, this.ˎ + 1, o_fus, this.ʼ, this.ॱॱ, this.ʽ, this.ᐝ, this.ˋॱ);
            fuo o_fuo = (fuo) this.ˏ.get(this.ˎ);
            fvb ˎ = o_fuo.ˎ(o_fvz);
            if (o_fvv != null && this.ˎ + 1 < this.ˏ.size() && o_fvz.ͺ != 1) {
                throw new IllegalStateException("network interceptor " + o_fuo + " must call proceed() exactly once");
            } else if (ˎ == null) {
                throw new NullPointerException("interceptor " + o_fuo + " returned null");
            } else if (ˎ.ᐝ() != null || o_fus.ʼ()) {
                return ˎ;
            } else {
                throw new IllegalStateException("interceptor " + o_fuo + " returned a response with no body");
            }
        } else {
            throw new IllegalStateException("network interceptor " + this.ˏ.get(this.ˎ - 1) + " must call proceed() exactly once");
        }
    }
}
